package dahua_design.model03;

import dahua_design.model01.User;
import dahua_design.model02.IUser;

/**
 * @ClassName: Client
 * @Description: 客户端-抽象工厂模式
 * @Version: v1.0.0
 * @Author: tamir
 * @Date: 2022/06/01
 * Modification History:
 * Date             Author      Version     Description
 * -------------------------------------------------------------
 * 2022/06/01      tamir        v1.0.0      创建
 */
public class Client {
	public static void main(String[] args) {
		User user = new User();
		Department department = new Department();
		
		IFactory factory = new AccessFactory();
		
		IUser iUser = factory.createUser();
		iUser.getUser(1);
		iUser.insert(user);
		
		IDepartment iDepartment = factory.createDepartment();
		iDepartment.getDepartment(1);
		iDepartment.insert(department);
	}
}
